﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserPanel : System.Web.UI.Page
{
    public string userName;
    public string phoneNumber;
    public string scoreAmount;
    public string consumedMoneyEveryMonth;
    public string refLink;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (User.Identity.IsAuthenticated)
        {
            global::User user = UserManager.GetInstance().FindUser(User.Identity.Name);
            userName = user.UserName;
            phoneNumber = user.PhoneNumber;
            scoreAmount = user.Money.ToString();
            consumedMoneyEveryMonth = user.ConsumedMoneyEveryMonth.ToString();
            refLink = "http://www.shuyixia.com/?refUser=" + userName;
        }
        else
        {
            Session["errorMessage"] = "请先<a href=\"./logon.aspx\">登录</a>";
            Response.Redirect("./error.aspx");
        }
    }
}